package com.xh.springCloud.config.client;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by xuhao on 2016/11/9.
 */
@RestController
public class TestController {

    @Value("${mysql.url}")
    String url;

    @Autowired
    TestProperties testProperties;

    @RequestMapping
    public String test(){
        return testProperties.getUrl();
    }
}
